/** @file button.h
*/
#ifndef _BUTTON_H_
#define _BUTTON_H_

#include "widget.h"
#include "font.h"

typedef enum {
    SIGNAL_BUTTON_DOWN=0,
    SIGNAL_BUTTON_UP,
    SIGNAL_BUTTON_MAX
} button_signal;

class Button: public Widget
{
public:
    Button(HWND parent=0, char *text="");
    ~Button();
    
    void setFont(FONT *font);
    void setState(bool state);
    bool getState();
    void setText(char *text);
    
    Signal signal[SIGNAL_BUTTON_MAX];
    
private:
    bool state;
    FONT *font;
    char *text;
    virtual void draw(Rect *r);
    virtual int eventHandler(HWND hWnd, int iMsg, WPARAM wParam, LPARAM lParam);
};


#endif


